home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / WINDOWS / PRIMER31.ARJ / MRDOS4.TXT < prev    next >
Text File  |  1992-03-12  |  5KB  |  115 lines

  1. -------------------------------[ DOS LEVEL 2 ]--------------------------------
  2.  
  3. We have seen that DOS's mission is one of file management.  Every software
  4. has a purpose and DOS's is for housekeeping of files.  However, we also saw
  5. that DOS is unique because we can't run the computer without it.  We must
  6. "boot" the system with the internal DOS files each time we start the computer.
  7. Finally, most people don't realize that DOS is also the Swedish word for
  8. toilet.  Which DOS is more important in your life?   Too obvious to comment.
  9.  
  10. WHEN A COMPUTER IS POWERED UP
  11. -----------------------------
  12. What actually happens when the computer is started?  First, a factory preset
  13. set of instructions residing in ROM are activated.  ROM stands for Read Only
  14. Memory.  This set of chips can send instructions TO RAM, but it cannot receive
  15. them - thus cannot be altered.  The unalterable set of ROM instructions
  16. performs systems checks to make sure all critical hardware components are
  17. hooked up properly and in the case of RAM, operating properly.
  18.  
  19. Once the hardware check is performed, ROM instructs RAM to search the A drive
  20. for internal DOS files.  If no disk is present in drive A, then ROM directs
  21. RAM to check the Root directory of the hard drive for the necessary files
  22. (more on Root directories in Hard Disk Level 1).  If the files are found, they
  23. are automatically loaded into to RAM (booted).
  24.  
  25. There are 3 files which comprise internal DOS:  IBMDOS.SYS, IBMBIO.SYS and
  26. COMMAND.COM.  The first 2 files are hidden files.  They cannot be seen in a
  27. DIR command, nor can they be copied or deleted with conventional DOS commands.
  28. These files are responsible for the linking of the hardware components.  The
  29. final file, COMMAND.COM CAN be seen, copied or deleted, and contains the
  30. frequently used internal DOS file management commands.  Again, the system will
  31. not boot without these 3 files.
  32.  
  33. It is from the DOS prompt:       A>
  34. that we can go forward with
  35. the task of file management.
  36.  
  37. We have already seen a handful of the most useful DOS file management
  38. commands (DOS Level 1).  Lets expand their abilities with the use of file
  39. WILDCARDS.
  40.  
  41. WILDCARDS
  42. ---------
  43. Wildcards allow the power of a DOS command to expand.  For example, imagine
  44. that you need to copy 12 files from a disk containing 100.  The 12 files all
  45. begin with the word SALES.   Sales.Jan, Sales.Feb, Sales.Mar ...
  46.  
  47. We could copy each file individually:  A>Copy Sales.Jan B:
  48.                                        A>Copy Sales.Feb B:
  49.                                        ......
  50.  
  51. Or, we could do it in one command with the use of a wildcard:
  52.  
  53.                                        A>Copy Sales.* B:
  54.  
  55. The asterisk (*) represents a wildcard.  It is often referred to as a star.
  56. The above command would read "Copy Sales dot star space B full colon".          
  57.  
  58. Any DOS command that references a filename can make use of wildcards to expand
  59. the command.  When a Copy command is issued, DOS is instructed which single
  60. file to copy.  However, when we use a wildcard, DOS is instructed to use any
  61. files that meet the criteria.  The asterisk expands the criteria for
  62. qualifying files.
  63.  
  64. A>Copy Sales.* B:   says "copy any file from drive A to drive B that contains
  65.                           SALES as the filename, regardless of the extension"
  66.  
  67. What if we wanted to include the files:   SALES1.DOC, SALES10.DOC and
  68.                                           SALESMAN.SUM
  69.  
  70. SALES.* is not broad enough criteria to include these files.  Rather, we would
  71. enter:
  72.              A>Copy SALES*.* B:
  73.  
  74. Now the criteria is to copy ANY file as long as the first 5 characters are S A
  75. L E S regardless of what other characters come after these first 5 in the
  76. filename or what exists in the extension.
  77.  
  78. The asterisk is the broadest and most often used wildcard.  Some other
  79. examples of its use:
  80.  
  81.              A>Copy *.DOC B:    (All files with the extension DOC)
  82.              A>Del S*.*         (Any file that begins with the letter S)
  83.              A>Del B:*.*        (ALL files from the B drive - be careful!)
  84.              A>Dir B:*.COM      (A list of all files with an extension of COM
  85.                                  on the B drive)
  86.  
  87. Anywhere a file specification can be given in DOS, the specification can be
  88. broadened with a wildcard.  The asterisk is very useful.
  89.  
  90. Another wildcard is the question mark (?).  It, too, broadens the criteria for
  91. a command,  however,  it is "location specific".  For example:
  92.  
  93.               A>Copy S?.DOC B:
  94.  
  95. Any file that only has S as the first character followed by a single character
  96. in the second position or not will be copied.  Therefore, these files would
  97. make it:   S.DOC    SA.DOC SI.DOC    S5.DOC.
  98.  
  99. But not:   SALES.DOC   SAT.DOC   S5.EXE
  100.  
  101. Wildcards can be used together:
  102.  
  103.               A>Copy S?L*.* B:
  104.  
  105. This will use the following:    SALES.COM    SAL     S5L.DOC    SL.EXE
  106.  
  107.                     But not:    SAM.DOC    BUDGET.SL
  108.  
  109. The wildcard characters,  *  and ?  are used with DOS commands such as DIR,
  110. COPY and DEL to broaden their application.  An asterisk, or "star", allows up
  111. to 8 characters at any position in a file name.  A question mark does the
  112. same, but for only 1 character position.
  113.  
  114. *****   END OF FILE:  Press <ESC> to return to Main Menu   *****
  115.